package com.workplan.client.widgets.employeeitem;

import net.customware.gwt.presenter.client.widget.WidgetDisplay;

import com.general.client.action.ActionHandler;
import com.general.client.basewidget.BasePresnter;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.HasValue;
import com.workplan.shared.datamodel.employee.EmployeeDataModel;
import com.workplan.shared.datamodel.employee.EmployeeDataModel.Role;

public interface EmployeeItemPresenter extends BasePresnter {

	void setModel(EmployeeDataModel dataModel);

	HandlerRegistration addHistoryActionHandler(ActionHandler handler);

	HandlerRegistration addRemoveActionHandler(ActionHandler handler);

	public interface Display extends WidgetDisplay {
		HandlerRegistration addHistoryActionHandler(ActionHandler handler);

		HandlerRegistration addRemoveActionHandler(ActionHandler handler);

		HasText getFirstName();

		HandlerRegistration addFirstNameChangeHandler(
				ValueChangeHandler<String> handler);

		HasText getLastName();

		HandlerRegistration addLastNameChangeHandler(
				ValueChangeHandler<String> handler);

		HasText getPhoneNum();

		HandlerRegistration addPhoneNumChangeHandler(
				ValueChangeHandler<String> handler);

		HasText getEmail();

		HandlerRegistration addEmailChangeHandler(
				ValueChangeHandler<String> handler);

		HasValue<Integer> getMinShifts();

		HandlerRegistration addMinShiftsChangeHandler(
				ValueChangeHandler<Integer> handler);

		HasValue<Integer> getMaxShifts();

		HandlerRegistration addMaxShiftsChangeHandler(
				ValueChangeHandler<Integer> handler);

		HasValue<Role> getRole();

		HandlerRegistration addRoleChangeHandler(
				ValueChangeHandler<Role> handler);
	}

}
